package com.example.hcmiu.englishforkid;

import android.os.Bundle;
import android.app.Activity;
import android.content.DialogInterface;
import android.content.Intent;
import android.view.KeyEvent;
import android.view.Menu;
import android.view.View;
import android.view.Window;
import android.view.View.OnClickListener;
import android.widget.Button;

public class MenuStartActivity extends Activity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		requestWindowFeature(Window.FEATURE_NO_TITLE);
		setContentView(R.layout.activity_menu_start);
		MainActivity.CurrentActivity = this;
	}

	public void MovePage(View v) {
		Button b = (Button) v;
		System.out.println("Pages = " + b.getTag().toString());

		Intent intent = new Intent(getApplicationContext(),
				AlphabetActivity.class);
		intent.putExtra("page", b.getTag().toString());
		startActivity(intent);
	}

	public boolean onKey(DialogInterface dialog, int keyCode, KeyEvent event) {
		System.out.println("AAAAAAAAAAAAA OK ROI");
		
		boolean disableEvent = false;
		if (event.getKeyCode() == KeyEvent.KEYCODE_BACK) {
			disableEvent = true;
		}

		System.out.println("AAAAAAAAAAAAA OK ROI = " + disableEvent);
		
		return disableEvent;
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.menu_start, menu);
		return true;
	}

}
